//
//  StoreManageCell.m
//  WGFGlobalHouses
//
//  Created by waiguofang on 15/6/2.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "StoreManageCell.h"

@implementation StoreManageCell
-(void)initWithTableView:(UITableView *)tableView;
{
    self.delegate = tableView;
    
    self.showFuntionBtn1 = true;
    self.showFuntionBtn2 = true;
    self.showFuntionBtn3 = NO;
    [self setContentHight:60];
   
    
    [self.funtionBtn1 addTarget:self action:@selector(btnOnClick:) forControlEvents:UIControlEventTouchUpInside];
     [self.funtionBtn2 addTarget:self action:@selector(btnOnClick:) forControlEvents:UIControlEventTouchUpInside];
    

    self.storeView = [StroeManageView createView];
    [self.storeView setFrame:CGRectMake(0, 0, self.contentMoveView.frame.size.width, self.contentMoveView.frame.size.height)];

    
    [self.contentMoveView addSubview:self.storeView];
    
}

-(void)setModel:(StoreInfoModel *)model
{
    _model = model;
    self.storeView.model = model;
    [self reSetfuntionBtn2TitleWithStauts:model.status];
}
+(CGFloat)getHeight;
{
    return 60;
}

-(void)setIsEditModel:(BOOL)isEditModel
{
    _isEditModel = isEditModel;
    
    [self cloadMenu];
    
    [self setScrollAble:!self.isEditModel];
    
    [self.storeView setIsEditMode:self.isEditModel];
    
}

-(void)btnOnClick:(UIButton *)btn
{
    if (self.btndelegate && [self.btndelegate respondsToSelector:@selector(storeMangeCellFuntionBtnOnClick:WithModel:)]) {
        
        [self.btndelegate storeMangeCellFuntionBtnOnClick:btn WithModel:self.model];
    }
}
@end
